
/*
 * This is GPL v2 licensed code. See the file LICENSE in the
 * source distribution, or www.gnu.org/copyleft/gpl.html, for
 * more information.
 *
 * Copyright (C) by Håkan Lindqvist 2006, 2007
 */

package PolicyToolGui;


import java.io.IOException;


/** 
 * This class is used to read menu properties.
 */
public class MenuPropertyLoader extends PropertyLoader {
	private static PropertyLoader singleton = null;

	/** 
	 * Constructor.
	 *
	 * @throws IOException If something goes wrong when loading
	 *         the properties file.
	 */
	private MenuPropertyLoader() throws IOException {
		super("Menu.properties");
	}


	/** 
	 * Fetches a property.
	 * 
	 * @param key The property te fetch a value for.
	 * @return The property.
	 * @throws IOException If something goes wrong when loading
	 *         the properties file.
	 */
	public static String getProperty(String key) throws IOException {
		if (singleton == null) {
			singleton = new MenuPropertyLoader();
		}
		return singleton.getPropertyByKey(key);
	}
}
